package router

import (
	"github.com/gin-gonic/gin"
	"lin6xcom/src/controller"
)

// 用户相关路由
func userRouter(e *gin.Engine) {
	userGroup := e.Group("/user")
	{
		userGroup.POST("/login", controller.UserController{}.Login)
		userGroup.POST("/register", controller.UserController{}.Register)
		userGroup.PUT("/update", controller.UserController{}.UpdateUserInfo)
		userGroup.DELETE("/delete", controller.UserController{}.DeleteUser)
		userGroup.GET("/info", controller.UserController{}.GetUserInfo)
		userGroup.GET("/all", controller.UserController{}.GetAllUser)
		userGroup.GET("/logout", controller.UserController{}.Logout)
	}
}
